<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>用户注册</title>
<script type="text/javascript" src="__PUBLIC__/Home/default/js/zepto.js"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Common/css/reg.css">
</head>
<script>
	$(document).ready(function(e) {
        $.ajax({
			url:"{:U('Ajax/getRegion')}",
			data:"",
			type:"POST",
			dataType:"html",
			success: function(data){
				$('#areabox').html(data);
			}
		});
    });
	function removnextAll(e){
		if($(e).next().length>0){
			removnextAll($(e).next());
			$(e).next().remove();
		}
	}
	function sendRegion(e){
		if(e.value>0){
			$.ajax({
			url:"{:U('Ajax/getRegion')}",
			data:"fid="+e.value,
			type:"POST",
			dataType:"html",
				success: function(data){
					removnextAll(e);
					$(e).parent().append(data);
				}
		    });
	    }else{
		    removnextAll(e);
	    }
	    return false;
	}
</script>
<body>
<div class="regBox">
<form action="{:U('Member/Public/doReg')}">
<ul>
	<li>用户名
	  <input type="text" name="username" id="username">
	</li>
    <li>密码
      <input type="text" name="password" id="password">
    </li>
    <li>确认密码
      <input type="text" name="repassword" id="repassword">
    </li>
    <li>地区：<span id="areabox"></span></li>
    <li><button type="submit">注册</button></li>
</ul>
</form>
</div>
</body>
</html>